---
id: 8d7e28b4-0131-4db4-bea5-9006d7e24e9c
---
classDiagram
    %% Classes %%
    class TaskAgent {
        - messages : list
        - LLMservice : LLMService
        - numCheckMain : int
        - curTask : str
        --
        + addMsg(jsonobj: dict)
        + stepPre(task: str) : None
        + checkPre() : None
        + stepMain() : None
        + addPntToolRtn(tool_result: dict, tool_call)
        + main(task: str)
    }

    class LLMService {
        + funcCallLLM(question: str, imagePath: str, tools: list, messages: list)
        + embedding(content: list[str]) : list[list[float]]
    }

    class Operation {
        + router(name: str, args: dict, taskagent: TaskAgent) : dict
        + Forward(distance: int) : dict
        + Turn(direction: int) : dict
        + Capture(yaw_degree: float, pitch_degree: float) : dict
        + Speak(content: str) : dict
        + SetSchedule(jobtype: str, task: str, hour: int, minute: int, second: int, agent: TaskAgent)
        + FindWalk(searchWith: str, label: Union[int,str], walk: bool, catch: bool, putToPack: bool) : dict
        + recog(searchWith: str, label: Union[int,str])
        + findAround(searchWith: str, label: Union[int,str])
    }

    class Tools {
        <<pydantic models>>
        + ForwardModel
        + TurnModel
        + CaptureModel
        + SpeakModel
        + SetScheduleModel
        + ArmMoveModel
        + FindWalkModel
    }

    class armMotion {
        + moveToPose(pose: tuple)
        + pickAndPlace(...)
        + openGripper()
        + closeGripper()
        + ...
    }

    class legMotion {
        + walk()
        + stand()
        + rightround()
        + leftround()
        + ...
    }

    class wheelMotion {
        + move(x: float, y: float, speed: float)
    }

    class TransformPos {
        + imgPos2BasePos(recog_obj: dict)
    }

    class SerialControl {
        + servoRads(rads: list)
        + sendStr(command: str)
        ...
    }

    %% Relationships %%
    TaskAgent --> LLMService : uses
    TaskAgent --> Operation : calls router(...)
    Operation --> Tools : references pydantic models
    Operation --> armMotion : manages arm movement
    Operation --> legMotion : manages walking/turn
    Operation --> wheelMotion : manages wheel motion
    Operation --> TransformPos : coordinate transforms
    armMotion --> SerialControl : hardware comm
    legMotion --> SerialControl : hardware comm
    wheelMotion --> SerialControl : hardware comm

style TaskAgent fill:#E6F7FF
style LLMService fill:#E6F7FF
style Operation fill:#E6F7FF